import request from '@u/request'
const UserModule = ''

export function getRoleList(pageQuery) {
  return request.get(`${UserModule}/role/query`, {
    params: {
      ...pageQuery,
    },
  })
}

// 删除角色
export function deleteRole(pkid) {
  return request.delete(`${UserModule}/role/delete`, {
    params: {
      pkid,
    },
  })
}

// 编辑角色
export function updateRole(pkid, data) {
  return request.put(`${UserModule}/role/update/${pkid}`, JSON.stringify(data))
}

// 添加角色
export function addRole(data) {
  return request.post(`${UserModule}/role/add`, JSON.stringify(data))
}
